/**
 *清空表单
 * @param form
 */
export function clearForm(form){
    Object.keys(form).forEach(key =>{
        form[key] = ""
    })
}

/**
 * 复制表单
 * @param form
 * @param data
 */
export function copyForm(form,data){
    Object.keys(form).forEach(key =>{
        form[key] = data[key]
    })
}

const fieldKeys = [
    "updateTime",
    "createTime"
]

export function filterFormFields(form = {}){
    fieldKeys.forEach(key => {
        form[key] = undefined
    })
}

